package com.project.livetv.activity;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.project.livetv.R;

public class LoginActivity extends BaseActivity {
   private final int DECODE=1;
    private Handler handler=new Handler(){
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what){
                case DECODE:
                    startActivity(new Intent(LoginActivity.this,MainActivity.class));
                    finish();
                    break;
            }
        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {

    }

    @Override
    public void setData() {
       new Thread(new Runnable() {
           @Override
           public void run() {
               Message message=Message.obtain();
               message.what=DECODE;
               handler.sendEmptyMessageDelayed(message.what,2000);
           }
       }).start();
    }

    @Override
    public void setListener() {

    }
}
